<?php
use App\Http\Controllers\Admin;
Route::get('admin',[Admin\LoginController::class,'index']);
Route::post('admin/check',[Admin\LoginController::class,'checkLogin']);
//Route::get('admin/index',[Admin\IndexController::class,'index']);
Route::get('admin/logout',[Admin\IndexController::class,'logout']);
//Route::get('admin/welcome',[Admin\IndexController::class,'welcome']);

Route::group(['prefix'=>'admin','middleware'=>['admincklogin'],'as'=>'admin.'],function (){
    Route::get('index',[Admin\IndexController::class,'index']);
    Route::get('error',[Admin\IndexController::class,'error']);
    Route::get('welcome',[Admin\IndexController::class,'welcome']);
    Route::any('getmenulist/{id}', [Admin\MenuController::class,'getMenu']);
    Route::resource('adminuser',Admin\AdminUserController::class);
    Route::resource('adminrole', Admin\RoleController::class);
    Route::resource('adminmenu', Admin\MenuController::class);
    //文章管理
    Route::resource('article', Admin\ArticleController::class);
    //文章分类
    Route::resource('articlecate', Admin\ArticleCateController::class);

    Route::any('goods_classes/upload/thumb',[Admin\GoodsClassController::class,'goods_class_upload'])->name('goods_classes.goods_class_upload'); // 缩略图上传
    Route::resource('goodsclasses', Admin\GoodsClassController::class);
    Route::resource('goodsbrands', Admin\GoodsBrandController::class);
    Route::resource('goodsattrs', Admin\GoodsAttrController::class);

    Route::any('goods/upload/thumb',[Admin\GoodsController::class,'goods_image_upload'])->name('goods.goods_image_upload'); // 缩略图上传

    Route::resource('goods', Admin\GoodsController::class);
    Route::resource('seckill', Admin\SeckillController::class);
    Route::resource('queue', Admin\QueueController::class);


});

